<html>
<head>
    <title>Monitor Console</title>
    <script src="../lib/jquery-3.2.1.js"></script>
    <script src="../lib/vue.js"></script>
    <script src="../lib/bootstrap/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="../lib/bootstrap/css/bootstrap.css">
</head>
<body>
<div id="all" style="padding-top: 10px;padding-left: 10px">
    <ul class="nav nav-tabs">
        <template v-for="(env,idx) in envs">
            <li v-bind:class="{active: idx == 0}"><a :href="getTabHref(env.name)" data-toggle="tab">{{ env.name }}</a></li>
        </template>
    </ul>
    <div id="tabContent" class="tab-content">
        <template v-for="(env,idx) in envs">
        <div v-bind:class="{active: idx==0}" class="tab-pane fade in" :id="env.name">
            <div class="panel-group" id="accordion">
                <template v-for="(app,idx) in env.apps">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h4 class="panel-title">
                            <a data-toggle="collapse" data-parent="#accordion"
                               :href="getAppHref(env.name, app.name)">
                                <span v-if="app.status == 1" class="alert-success">{{app.name}}</span>
                                <span v-else class="alert-danger">{{app.name}}</span>
                            </a>
                        </h4>
                    </div>
                    <div :id="getAppHref(env.name, app.name).substring(1)" class="panel-collapse collapse">
                        <div class="panel-body">
                            <ul class="list-group">
                                <li v-for="server in app.servers" class="list-group-item">{{server.serverInfo}}</li>
                            </ul>
                        </div>
                    </div>
                </div>
                </template>
            </div>
        </div>
        </template>
    </div>
</div>
<script src="../resources/js/index.js"></script>
</body>
</html>
